<?php

namespace Admin\Models\bpm;

use Admin\Models\BaseModel;

class XHBpmTemplate extends BaseModel
{

    /**
     *
     * @var integer
     * @Primary
     * @Identity
     * @Column(type="integer", length=11, nullable=false)
     */
    public $iTPId;

    /**
     *
     * @var string
     * @Column(type="string", length=100, nullable=true)
     */
    public $sTPName;

    /**
     *
     * @var integer
     * @Column(type="integer", length=1, nullable=true)
     */
    public $bDelete;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    public $tCreateDate;

    /**
     *
     * @var integer
     * @Column(type="integer", length=11, nullable=true)
     */
    public $iCreateUserId;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    public $tLastModifyDate;

    /**
     *
     * @var integer
     * @Column(type="integer", length=11, nullable=true)
     */
    public $iLastModifyUserId;

    /**
     * 0 未选择  1 通用 2 个人 3 部门
     * @var integer
     * @Column(type="integer", length=11, nullable=true)
     *
     * create by dale 20180810
     */
    public $iType;

    /**
     * 部门标签
     * @var string
     * @Column(type="string", length=200, nullable=true)
     *
     * create by dale 20180810
     */
    public $sDepIds;

    /**
     * 模板标识符
     * @var string
     * @Column(type="string", length=200, nullable=true)
     *
     * create by dale 20180810
     */
    public $sTag;

    /**
     * 0 => 两层,1 => 多层
     *
     * @var integer
     * @Column(type="integer", length=4, nullable=true)
     *
     * create by dale 20180810
     */
    public $bMultiLevel;

    /**
     * Initialize method for model.
     */
    public function initialize()
    {
        parent::initialize();
        $this->setSource("XHBpm_Template");
    }

    /**
     * Returns table name mapped in the model.
     *
     * @return string
     */
    public function getSource()
    {
        return 'XHBpm_Template';
    }

    /**
     * Allows to query a set of records that match the specified conditions
     *
     * @param mixed $parameters
     * @return XHBpmTemplate[]|XHBpmTemplate|\Phalcon\Mvc\Model\ResultSetInterface
     */
    public static function find($parameters = null)
    {
        return parent::find($parameters);
    }

    /**
     * Allows to query the first record that match the specified conditions
     *
     * @param mixed $parameters
     * @return XHBpmTemplate|\Phalcon\Mvc\Model\ResultInterface
     */
    public static function findFirst($parameters = null)
    {
        return parent::findFirst($parameters);
    }

}
